import request from '@/utils/request'
import qs from 'qs'
//Excel导出
export function modelNameIndex(modelNameIndex,data) {
  return request({
    url: `/applet-api/excel/e/${modelNameIndex}`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
//根据id获取配电室详细
export function pdroomgetById(id) {
  return request({
    url: '/applet-api/pdroom/getById?roomId='+id,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新配电室记录
export function pdroomupdate(data) {
  return request({
    url: '/applet-api/pdroom/update ',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//部门列表分页查询
export function deptlist(data) {
  return request({
    url: '/applet-api/dept/list',
    method: 'post',
    data
  })
}
//获取用户信息
export function getlist(data) {
  return request({
    url: '/applet-api/user/list',
    method: 'post',
    data
  })
}
//根据参数获取用户信息
export function getlists(data) {
  return request({
    url: '/applet-api/user/get/list',
    method: 'post',
    data
  })
}

// 批量更新用户信息
export function updateUser(data) {
  return request({
    url: '/applet-api/user/update',
    method: 'post',
    data
  })
}

//获取配电室中巡检记录类型信息
export function pdroomgetRecordTypeDict() {
  return request({
    url: '/applet-api/robotroom/admin/recordList',
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增配电室记录
export function pdroomadd(data) {
  return request({
    url: '/applet-api/pdroom/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//根据查询条件分页获取所有的配电室
export function pdroomgetAllByQuery(data) {
  return request({
    url: '/applet-api/pdroom/getAllByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//修改配电室是否可用的状态
export function pdroomchangeStatus(data) {
  return request({
    url: '/applet-api/pdroom/changeStatus',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新配电室出入记录
export function roominrecordupdate(data) {
  return request({
    url: '/applet-api/roominrecord/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//根据配电室名称模糊匹配所有的配电室
export function pdroomgetAllByRoomName(data) {
  return request({
    url: '/applet-api/pdroom/getAllByRoomName',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
// 配电室出入列表查询
export function getAllAdminlist(data) {
  return request({
    url: '/applet-api/roominrecord/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增配电室出入记录
export function roominrecordadd(data) {
  return request({
    url: '/applet-api/roominrecord/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//根据巡检记录类型获取配电室名称
export function pdroomgetPdroomNameByType(data) {
  return request({
    url: '/applet-api/pdroom/getPdroomNameByType',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//根据参数获取线路名称
export function pdroomByParam(data) {
  return request({
    url: '/applet-api/pdroom/getLineNameByParam',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//根据查询条件分页获取所有的配电室出入记录
export function roomingetAllByQuery(data) {
  return request({
    url: '/applet-api/roominrecord/getAllByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增10KV操作室巡检记录
export function kvoperationadd(data) {
  return request({
    url: '/applet-api/kvoperation/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}


//新增 10KV操作室巡检记录 下一组数据
export function kvoperationaddNextLine(data) {
  return request({
    url: '/applet-api/kvoperation/addNextLine',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//处理 10KV操作室巡检记录 异常
export function kvoperationDeal(data) {
  return request({
    url: '/applet-api/kvoperation/deal',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//详情 10KV操作室巡检记录 
export function kvoperationGetById(data) {
  return request({
    url: '/applet-api/kvoperation/getById?recordId='+data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}

//处理异常 10KV操作室巡检记录 
export function kvoperationDealAllException(data) {
  return request({
    url: '/applet-api/kvoperation/dealAllException',
    data,
    method: 'post',
    ContentType:'application/x-www-form-urlencoded'
  })
}

//后台--根据查询条件分页获取所有的10KV操作室巡检记录
export function kvoperationlist(data) {
  return request({
    url: '/applet-api/kvoperation/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新 10KV操作室巡检记录
export function kvoperationupdate(data) {
  return request({
    url: '/applet-api/kvoperation/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增 低压配电室巡检记录
export function lowroomadd(data) {
  return request({
    url: '/applet-api/lowroom/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//后台--根据查询条件分页获取所有的低压配电室巡检记录
export function lowroomgetAllAdminByQuery(data) {
  return request({
    url: '/applet-api/lowroom/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//查详情 --根据id获取低压配电室巡检详情
export function lowroomGetById(data) {
  return request({
    url: '/applet-api/lowroom/getById?roomId='+data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}

//更新 低压配电室巡检记录
export function lowroomupdate(data) {
  return request({
    url: '/applet-api/lowroom/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增 10KV干式变压器巡检记录
export function dryformeradd(data) {
  return request({
    url: '/applet-api/drytransformer/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//查详情 10KV干式变压器巡检记录
export function DrytransformerGetById(data) {
  return request({
    url: '/applet-api/drytransformer/getById?roomId='+data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}
//处理异常 10KV干式变压器巡检记录
export function drytransformerDeal(data) {
  return request({
    url: '/applet-api/drytransformer/deal',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//后台--根据查询条件分页获取所有的10KV干式变压器巡检记录
export function drygetQuery(data) {
  return request({
    url: '/applet-api/drytransformer/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新 10KV干式变压器巡检记录
export function drygetupdate(data) {
  return request({
    url: '/applet-api/drytransformer/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增 10KV变压器巡检记录
export function kvtransadd(data) {
  return request({
    url: '/applet-api/kvtransformer/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//查看 10KV变压器巡检记录
export function kvtransformerGetById(data) {
  return request({
    url: '/applet-api/kvtransformer/getById?transformerId=' + data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}
//后台--根据查询条件分页获取所有的10KV变压器巡检记录
export function kvtransgetQuery(data) {
  return request({
    url: '/applet-api/kvtransformer/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新 10KV变压器巡检记录
export function kvtransupdate(data) {
  return request({
    url: '/applet-api/kvtransformer/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//处理 10kv变压器的异常
export function kvtransformerDeal(data) {
  return request({
    url: '/applet-api/kvtransformer/deal',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增 SF6气体密度继电器巡检记录
export function sf6machineadd(data) {
  return request({
    url: '/applet-api/sf6machine/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//根据id获取SF6气体密度继电器巡检记录详细
export function sf6machineGetById(data) {
  return request({
    url: '/applet-api/sf6machine/getById?recordId='+data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}

//更新 气体密度
export function sf6machineUpdate(data) {
  return request({
    url: '/applet-api/sf6machine/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//后台--根据查询条件分页获取所有的SF6气体密度继电器巡检记录
export function sf6getQuery(data) {
  return request({
    url: '/applet-api/sf6machine/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增仪表机柜间巡检记录
export function meterroomadd(data) {
  return request({
    url: '/applet-api/meterroom/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//后台--根据查询条件分页获取所有的仪表机柜间巡检记录
export function meterQuery(data) {
  return request({
    url: '/applet-api/meterroom/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//更新仪表机柜间巡检记录
export function meterupdate(data) {
  return request({
    url: '/applet-api/meterroom/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

// 处理 仪表机柜间巡检记录
export function meterroomDeal(data) {
  return request({
    url: '/applet-api/meterroom/deal',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
// 详情 仪表机柜间巡检记录
export function meterroomGetById(data) {
  return request({
    url: '/applet-api/meterroom/getById?roomId='+data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}

//新增 智能机器人班机柜间巡检记录
export function robotroomadd(data) {
  return request({
    url: '/applet-api/robotroom/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//后台--根据查询条件分页获取所有的智能机器人班机柜间巡检记录
export function robotQuery(data) {
  return request({
    url: '/applet-api/robotroom/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新 智能机器人班机柜间巡检记录
export function robotupdate(data) {
  return request({
    url: '/applet-api/robotroom/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//查详情 智能机器人班机柜间巡检记录
export function robotroomGetById(data) {
  return request({
    url: '/applet-api/robotroom/getById?roomId='+data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}
// 处理 
export function robotroomDeal(data) {
  return request({
    url: '/applet-api/robotroom/deal',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//新增 主变巡检记录
export function maintransadd(data) {
  return request({
    url: '/applet-api/maintransformer/add',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//后台--根据查询条件分页获取所有的主变巡检记录
export function maintransByQuery(data) {
  return request({
    url: '/applet-api/maintransformer/getAllAdminByQuery',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//查详情 主变巡检记录
export function maintransformerGetById(data) {
  return request({
    url: '/applet-api/maintransformer/getById?mainTransformerRecordId=' + data,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}
//更新 主变巡检记录
export function maintransupdate(data) {
  return request({
    url: '/applet-api/maintransformer/update',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}
//处理异常 主变巡检记录
export function maintransformerDeal(data) {
  return request({
    url: '/applet-api/maintransformer/deal',
    method: 'post',
    data,
    ContentType:'application/x-www-form-urlencoded'
  })
}

//根据id获取配电室进出记录详细
export function roominrecordgetById(id) {
  return request({
    url: '/applet-api/roominrecord/getById?roomId='+id,
    method: 'get',
    ContentType:'application/x-www-form-urlencoded'
  })
}